package com.jsaber.transactiontest;

import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhouzijia
 * @version 1.0
 * @description
 * @date 2020/11/25 10:47
 */

@EnableTransactionManagement
@Transactional
public class TestServcieImpl {

	@Transactional(rollbackFor = Exception.class)
	public void testTransaction(int j){
		System.out.println("事务处理step1.....");
		int i = 1/j;
		System.out.println("事务处理step2....");
	}
}
